<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var name = "";
			var ans;
			do {
				name = prompt("请输入用户名");
				ans = prompt("q退出");
			}while(ans != "q");
		</script>
	</body>
</html>
